﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;

namespace sdk_cop
{
    public class ConsumePurchaseShowPayRequestV1: AbstractIcbcRequest<IcbcResponse>
    {
        /// <summary>
        /// 获取响应类
        /// </summary>
        /// <returns>返回AggregatePaymentRequestV3类对应的响应类类型</returns>
        public override Type getResponseClass()
        {
            //return Type.GetType("sdk_cop.AggregatePaymentRequestV3");
            return Type.GetType("sdk_cop.ConsumePurchaseShowPayRequestV1");
            
        }
     
        /// <summary>
        /// 是否支持加密（目前sdk只支持对字段进行AES加解密）
        /// </summary>
        /// <returns>一般返回false</returns>
        public override Boolean isNeedEncrypt()
        {
            return false;
        }
        /// <summary>
        /// http发起请求方式（支持GET、POST两种方式）
        /// </summary>
        /// <returns>一般返回POST</returns>
        public override string getMethod()
        {
            return "POST";
        }
        /// <summary>
        /// 获取业务类类型
        /// </summary>
        /// <returns>返回request类内部定义的BizContent类的类型</returns>
	    public override Type getBizContentClass() {
            return Type.GetType("sdk_cop" + ".ConsumePurchaseShowPayRequestV1+ConsumePurchaseShowPayRequestV1Biz", true, true);
        }
	    /// <summary>
	    /// 内部业务类，封装需要发送给服务端的业务字段
	    /// </summary>
        [DataContract]
        public class ConsumePurchaseShowPayRequestV1Biz : BizContent
        {
            [DataMember] private string mer_id; //商户编号 
            [DataMember] private string out_trade_no; //商户订单号，只能是数字、大小写字母，且在同一个商户号下唯一 
            [DataMember] private string mer_prtcl_no; //收单产品协议编号 
            [DataMember] private string order_amt; //订单金额，单位为分 100
            [DataMember] private string notify_url; //异步通知商户URL，端口必须为443或80 
            [DataMember] private string icbc_appid; //工行API平台的APPID 
            [DataMember] private string openId; //第三方用户标识，微信支付上送用户在商户APPID（指商户在微信开放平台的APPID）下的唯一标识；支付宝支付上送用户的唯一标识。若该字段不上送，取用户在工行APPID（指工行在微信开放平台的APPID）下的唯一标识 oUSDOusdsdISLSDlskdf
            [DataMember] private string saledepname; //门店名称，用于显示在买单页上。该长度限制是按GBK编码的字节长度，如”测试”，则所占长度为4。 
            [DataMember] private string body; //微信商品描述，传入微信公众号名称-实际商品名称。微信支付时必输，非微信支付的送空字符串 
            [DataMember] private string subject; //支付宝的订单标题，支付宝支付时必输，非支付宝支付的送空字符串 
            [DataMember] private string notify_type; //通知类型，表示在交易处理完成后把交易结果通知商户的处理模式。取值“HS”：在交易完成后将通知信息，主动发送给商户，发送地址为notify_url指定地址； 取值“AG”：在交易完成后不通知商户。不送或送空，默认为”HS” HS
            [DataMember] private string result_type; //结果发送类型，通知方式为HS时有效。取值“0”：无论支付成功或者失败，银行都向商户发送交易通知信息；取值“1”，银行只向商户发送交易成功的通知信息。不送或送空，默认为”0” 0
            [DataMember] private string mer_acct; //商户账号，商户入账账号，只能交易时指定。（商户付给银行手续费的账户，可以在开户的时候指定，也可以用交易指定方式；用交易指定方式则使用此商户账号）。该字段暂不支持上送 
            [DataMember] private string expireTime; //订单失效时间，单位为秒，建议大于60秒 120
            [DataMember] private string attach; //附加数据，在查询API和支付通知中原样返回，该字段主要用于商户携带订单的自定义数据 
            [DataMember] private string return_url; //支付成功回显页面，支付成功后，跳转至该页面显示。默认跳转到工行的广告页 
            [DataMember] private string pay_limit; //支付方式限定，上送”no_credit“表示不支持信用卡支付；上送“no_balance”表示仅支持银行卡支付；不上送或上送空表示无限制。暂只支持微信公众号 
            [DataMember] private string shop_appid; //商户在微信开放平台的APPID，微信支付且openId有值时必送 
            [DataMember] private string order_apd_inf; //订单附加信息 
            [DataMember] private string detail; //商品详细描述，对于使用单品优惠的商户，该字段必须按照规范上传。微信与支付宝的规范不同，请根据支付方式对应相应的规范上送 
            [DataMember] private string cust_name; //客户姓名（仅实名认证输入） 
            [DataMember] private string cust_cert_type; //证件类型（仅实名认证输入） 0-身份证；1-护照；2-军官证;3-士兵证；6-户口薄（微信支付仅支持身份证）
            [DataMember] private string cust_cert_no; //证件号码（仅实名认证输入） 
            [DataMember] private string goods_tag; //订单优惠标记 

            public string getMerId() => mer_id;
            public string getOutTradeNo() => out_trade_no;
            public string getMerPrtclNo() => mer_prtcl_no;
            public string getOrderAmt() => order_amt;
            public string getNotifyUrl() => notify_url;
            public string getIcbcAppid() => icbc_appid;
            public string getOpenId() => openId;
            public string getSaledepname() => saledepname;
            public string getBody() => body;
            public string getSubject() => subject;
            public string getNotifyType() => notify_type;
            public string getResultType() => result_type;
            public string getMerAcct() => mer_acct;
            public string getExpireTime() => expireTime;
            public string getAttach() => attach;
            public string getReturnUrl() => return_url;
            public string getPayLimit() => pay_limit;
            public string getShopAppid() => shop_appid;
            public string getOrderApdInf() => order_apd_inf;
            public string getDetail() => detail;
            public string getCustName() => cust_name;
            public string getCustCertType() => cust_cert_type;
            public string getCustCertNo() => cust_cert_no;
            public string getGoodsTag() => goods_tag;

            public void setMerId(string mer_id) => this.mer_id = mer_id;
            public void setOutTradeNo(string out_trade_no) => this.out_trade_no = out_trade_no;
            public void setMerPrtclNo(string mer_prtcl_no) => this.mer_prtcl_no = mer_prtcl_no;
            public void setOrderAmt(string order_amt) => this.order_amt = order_amt;
            public void setNotifyUrl(string notify_url) => this.notify_url = notify_url;
            public void setIcbcAppid(string icbc_appid) => this.icbc_appid = icbc_appid;
            public void setOpenId(string openId) => this.openId = openId;
            public void setSaledepname(string saledepname) => this.saledepname = saledepname;
            public void setBody(string body) => this.body = body;
            public void setSubject(string subject) => this.subject = subject;
            public void setNotifyType(string notify_type) => this.notify_type = notify_type;
            public void setResultType(string result_type) => this.result_type = result_type;
            public void setMerAcct(string mer_acct) => this.mer_acct = mer_acct;
            public void setExpireTime(string expireTime) => this.expireTime = expireTime;
            public void setAttach(string attach) => this.attach = attach;
            public void setReturnUrl(string return_url) => this.return_url = return_url;
            public void setPayLimit(string pay_limit) => this.pay_limit = pay_limit;
            public void setShopAppid(string shop_appid) => this.shop_appid = shop_appid;
            public void setOrderApdInf(string order_apd_inf) => this.order_apd_inf = order_apd_inf;
            public void setDetail(string detail) => this.detail = detail;
            public void setCustName(string cust_name) => this.cust_name = cust_name;
            public void setCustCertType(string cust_cert_type) => this.cust_cert_type = cust_cert_type;
            public void setCustCertNo(string cust_cert_no) => this.cust_cert_no = cust_cert_no;
            public void setGoodsTag(string goods_tag) => this.goods_tag = goods_tag;

        }
    }
}
